Returns the available audio input devices, such as microphones, audio interfaces and line-ins.
async function listAudioInputDevices(): Promise<MediaDeviceInfo[]>;
The listAudioInputDevices() function queries the browser for all available media devices and returns only the audio input devices, as plain MediaDeviceInfo objects.
Use the result with AudioDevice.createInputChannel() to open a device on a new InputChannel, or with InputChannel.setInputDevice() to switch the device of an existing input channel. Unlike the deprecated resolveAudioInputDevices(), this function does not create an AudioContext for every device.
Device labels are only filled in after the user granted permission to access media devices, which DspPipeline.initializeDpsPipeline() requests.
Note: This function is asynchronous and must be called within an asynchronous scope.
This function does not accept any parameters.
MediaDeviceInfo[] – All devices of kind "audioinput".import { listAudioInputDevices } from "@fluex/fluexgl-dsp";
const inputs = await listAudioInputDevices();
const microphone = await audioDevice.createInputChannel(inputs[0], "Microphone");
If the browser blocks access to media device enumeration due to missing permissions or an insecure context, enumerateDevices() may throw a DOMException.
No custom FluexGL-DSP error codes are currently emitted by this function.